package com.bjc.eduservice.client;

import com.bjc.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @program: guli_parent
 * @description: 服务调用
 * @author: bjc
 * @create: 2020-10-16 20:10
 */
@Component
//调用的服务名称
@FeignClient(value = "service-vod",fallback = VodFileDegradeFeignClient.class)
public interface VodClient {

    /**
     * 定义调用的方法路径
     * PathVariable注解一定要指定参数名称，否则报错
     */
    @DeleteMapping(value = "/eduvod/video/removeAlyVideo/{id}")
    public R removeAlyVideo(@PathVariable("id") String id);

    /**
     * 删除多个阿里云视频  参数多个视频id
     */
    @DeleteMapping(value = "/eduvod/video/delete-batch")
    public R deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
